23 research outputs found

    Synchronous Multiparty Session Types

    Get PDF
    AbstractSynchronous communication is useful to model multiparty sessions where control for timing events and strong sequentially order of messages are essential to the problem specification. This paper continues the work on multiparty session types initiated by Honda et al. [Honda, K., N. Yoshida and M. Carbone, Multiparty asynchronous session types, in: G. C. Necula and P. Wadler, editors, POPL (2008), pp. 273–284] for synchronous communications. It provides a more relaxed syntax of the calculus, multicasting, higher-order communication via multipolarity labels and a clear definition of delegation in global types. The linearity property defines when a channel can be used in two different communications without creating a race condition and the type system checks if all the processes of a session implement the communication behavior specified in the global type. The type system of the calculus is proved to be sound with respect to the operational semantics and coherent with respect to the global types

    Parameterised Multiparty Session Types

    Full text link
    For many application-level distributed protocols and parallel algorithms, the set of participants, the number of messages or the interaction structure are only known at run-time. This paper proposes a dependent type theory for multiparty sessions which can statically guarantee type-safe, deadlock-free multiparty interactions among processes whose specifications are parameterised by indices. We use the primitive recursion operator from G\"odel's System T to express a wide range of communication patterns while keeping type checking decidable. To type individual distributed processes, a parameterised global type is projected onto a generic generator which represents a class of all possible end-point types. We prove the termination of the type-checking algorithm in the full system with both multiparty session types and recursive types. We illustrate our type theory through non-trivial programming and verification examples taken from parallel algorithms and Web services usecases.Comment: LMCS 201

    Session-Based Programming for Parallel Algorithms: Expressiveness and Performance

    Full text link
    This paper investigates session programming and typing of benchmark examples to compare productivity, safety and performance with other communications programming languages. Parallel algorithms are used to examine the above aspects due to their extensive use of message passing for interaction, and their increasing prominence in algorithmic research with the rising availability of hardware resources such as multicore machines and clusters. We contribute new benchmark results for SJ, an extension of Java for type-safe, binary session programming, against MPJ Express, a Java messaging system based on the MPI standard. In conclusion, we observe that (1) despite rich libraries and functionality, MPI remains a low-level API, and can suffer from commonly perceived disadvantages of explicit message passing such as deadlocks and unexpected message types, and (2) the benefits of high-level session abstraction, which has significant impact on program structure to improve readability and reliability, and session type-safety can greatly facilitate the task of communications programming whilst retaining competitive performance

    Parameterised Session Types Communication Patterns: Through the Looking Glass of Session Types

    No full text
    This dissertation studies a type theory to guarantee communication-safety in sessions of an arbitrary number of participants, typically represented as communication patterns, of mobile processes in the context of multiparty session types— a well-established type theory that describes the interactive structure of a fixed number of processes from a global point of view and type-checks the processes through projection of the global type onto the participants of the session. Communication-safety is the property that mobile processes exchange values of the same set without deadlocking and data races. Our study introduces a programming idiom of roles— a concept that describes the nature of a communication pattern in a similar way to classes in Java and C#, offering a design on how to incorporate parameterised session types into a mainstream language. The formal model (1) preserves multiparty session types’ syntax and type-checking strategy, and (2) allows the number of participants to range over infinite sets of natural numbers, providing full computation power of programs. A series of communication patterns and real-world examples from parallel algorithms and data exchange protocols demonstrate the expressiveness and practicality of the formal model, comparing the model with the only mature implementation of (binary) session types. We proved that type preservation under reduction and communication-safety hold in the type system. The study of parameterised session types is supported by the examination of multiparty session types for synchronous communications. We extended the initial work on multiparty session types with a simpler calculus, multicast send of values and labels, a practical form of higher-order communication and a more intuitive, elegant linearity property; we proved that (a) type preservation and communication-safety hold in the type system, and (b) interactions of a typeable process follow exactly the description of the global type

    Session Typed Parameterised Communication Patterns

    Get PDF
    Abstract. Communication patterns describe simple and elegant structured interactions in communication based applications. They are used in many parallel computing architectures of parallel algorithms, data exchange protocols and web-services. Communication patterns help programmers to design more efficient, structured, modular and understandable architectures, but they do not provide any automatic code validation. We study this problem using global session types, a type theory that describes structured interactions from a global point of view. We then augment the syntax of global types with parameters that abstract the number of participants and an iterative construct that builds instances of parameterised communication patterns. Our formal system allows programmers to represent parameterised communication patterns by global types and then validate the code by type-checking.
    corecore